**************************************************************************************************
*** This do file creates the replication results for 
*** Thomas Pluemper and Eric Neumayer
*** The Politics of Covid-19 Containment Policies in Europe 
*** Published in: International Journal of Disaster Risk Reduction 81 (2022) 103206. https://doi.org/10.1016/j.ijdrr.2022.103206  
							
**************************************************************************************************
**************************************************************************************************
/* Note: You have to change "local DIR" to the directory you copy the original stata files contained 	*/
/* in the zip file and then run the do file. 
/* You must have Stata version 13 or higher installed													*/
**************************************************************************************************
*/

drop _all
clear matrix
clear mata


capture net install outreg2, from(http://fmwww.bc.edu/RePEc/bocode/o) /* checks whether outreg2 is installed 		*/



***********************************************************************************
local DIR = "D:\Research\Health for all database\Europe"  /*change relative path to the directory where the files are located */
cd "`DIR'"
***********************************************************************************


use "Article for IJDRR (C19)", clear

tsset id runday



** temporally defined waves

* wave 1 - 25 March 2020 to 9 May 2020
xtreg stringency_index l.stringency_index new_deaths_smoothed_per_million gdp_per_capita tour_inc_gdp median_age icu_beds   civilliberties lr checks govfrac oppfrac   pluralty trustp  if runday>84 & runday<131, cluster(id)
outreg2 using table1.xls, excel ci  replace

* wave 2 - 27 October to 19 May 2021
xtreg stringency_index l.stringency_index  new_deaths_smoothed_per_million gdp_per_capita tour_inc_gdp median_age icu_beds   civilliberties lr checks govfrac oppfrac   pluralty trustp  if runday>300 & runday<506, cluster(id)
outreg2 using table1.xls, excel ci  append



** wave threshold new_deaths_smoothed_per_million>1

* wave 1, day<200

xtreg stringency_index l.stringency_index new_deaths_smoothed_per_million gdp_per_capita tour_inc_gdp median_age icu_beds   civilliberties lr checks govfrac oppfrac   pluralty trustp  if runday<200 & new_deaths_smoothed_per_million>1, cluster(id)
outreg2 using table1.xls, excel ci  append


* wave 2, day>=200

xtreg stringency_index l.stringency_index new_deaths_smoothed_per_million gdp_per_capita tour_inc_gdp median_age icu_beds   civilliberties lr checks govfrac oppfrac   pluralty trustp  if runday>200 & new_deaths_smoothed_per_million>1, cluster(id)
outreg2 using table1.xls, excel ci  append   

